-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support delta brave_installer #5484
Conversation
fddc682
to
7a2fed8
Compare
cmd = [lzma_exec, | ||
'x', | ||
- '-o"%s"' % temp_dir, | ||
+ '-o%s' % temp_dir, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
W/o this change, lzma_exec
generates temp_dir
under c:/
instead of using cwd's one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ever possible for temp_dir
to have spaces? If so, you might try something like -o.\"%s"' % temp_dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, thanks for catching. It would be much safer.
Changed to -o./"%s" % temp_dir
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't understand why this is needed, how does it work for chrome?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussing with @bridiver , This is reverted to '-o%s' % temp_dir,
because relative path in out doesn't have space.
and asked about this in chromium shared slack channel.
def GenerateDiffPatch(options, orig_file, new_file, patch_file): | ||
if (options.diff_algorithm == "COURGETTE"): | ||
- exe_file = os.path.join(options.last_chrome_installer, COURGETTE_EXEC) | ||
+ exe_file = os.path.join(options.build_dir, COURGETTE_EXEC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last_chrome_installer is directory that contains previous version's installer dir.
courgettes exe is generated in ./out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or we can avoid this patch if we copy courgette.exe
from out/Release
to folder indicated by last_chrome_installer
before running build_delta_installer
by Jenkins job. cc @mihaiplesa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is deleted.
courgette.exe
will be copied from out/Release to last_chrome_installer
by pipeline.
7a2fed8
to
bfb1971
Compare
fac49c7
to
0d1d684
Compare
b31cbb7
to
e960833
Compare
b4c5420
to
f6a5108
Compare
cmd = [lzma_exec, | ||
'x', | ||
- '-o"%s"' % temp_dir, | ||
+ '-o./"%s"' % temp_dir, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mentioned here - #5484 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem here is what we're passing in for last_chrome_installer
because we shouldn't have to change the script itself. We should be passing in a a rebased value here https://github.com/brave/brave-core/pull/5484/files#diff-769a945034c01d9bc9d33ecfa819c902R18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I guess this is staging_dir
, but in any case this should be running in the root build dir so there's no reason for it to end up in the root of the filesystem
BUILD.gn
Outdated
# before running create_dist with build_delta_installer. | ||
# When mini_installer target generates diff installer patch, it assumes | ||
# that courgette.exe is already in last_chrome_installer folder. | ||
deps += [ "//courgette:copy_courgette_binaries" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right place to put this. https://github.com/brave/brave-core/pull/5484/files#diff-769a945034c01d9bc9d33ecfa819c902R20 should be consolidated into a single dep on //brave/installer/mini_installer
which has deps for courgette:copy_courgette_binaries
conditionally on build_delta_installer
and then on //brave
instead of //brave:packed_resources
and //brave/build/win:copy_exe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also this list is incomplete and can be eliminated by just making the target dependent on //brave
https://github.com/brave/brave-core/pull/5484/files#diff-769a945034c01d9bc9d33ecfa819c902R19
9a2c6b2
to
73a3f12
Compare
a981e06
to
a72b7ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should fix the path in gn, not patch the script https://github.com/brave/brave-core/pull/5484/files#r425343559
a72b7ee
to
28cfe06
Compare
28cfe06
to
ee0f732
Compare
By using additional options (--build_delta_installer and --last_chrome_installer) with create_dist command, we can build delta installer on Windows.
ee0f732
to
593ed79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ as this was previously approved; changes to lzma_exec
LGTM!
In this PR, two new sub options are added to
create_dist
command like below.last_chrome_installer
is used to pass folder that contains previous version's uncompressedchrome.7z
file.Courgette generate diff file based on previous version's
chrome.7z
file with newly builtchrome.7z
.This PR should be merged with brave/brave-browser#9667.
Resolves brave/brave-browser#9565
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.